import React from 'react';
import { Button } from 'antd';
import { VtxModal, VtxMap } from 'vtx-ui';
import styles from './ViewItem.less';
import { NAME_SPACE } from './config';

class Index extends React.Component{
  constructor(props){
    super(props)
    this.goBack = this.goBack.bind(this)
  }
  goBack(){
    const {dispatch} = this.props
    dispatch({
      type: `${NAME_SPACE}/updateState`,
      payload: {
        detailsModelVisable: false,
      }
    })
  };
  render(){
    const {detailsModelVisable, details, dispatch} = this.props
    let modalProps = {
      footer: [
          <Button key="back" onClick={this.goBack}>返回</Button>,
      ],
      onCancel:this.goBack,
      maskClosable: false,
      title:'详情',
      visible: detailsModelVisable,
      width: 500,
    };
    return(
      <div>
        <VtxModal {...modalProps}>
          <div>
            <div className = {styles.item}>
                <div className = {styles.halfContent}>
                    <div className = {styles.title}>车牌号：</div>
                    <div className = {styles.content}></div>
                </div>
            </div>
            <div className = {styles.item}>
                <div className = {styles.halfContent}>
                    <div className = {styles.title}>车辆品牌：</div>
                    <div className = {styles.content}></div>
                </div>
            </div>
            <div className = {styles.item}>
                <div className = {styles.halfContent}>
                    <div className ={styles.title}>购置日期：</div>
                    <div className = {styles.content}></div>
                </div>
            </div>
            <div className = {styles.item}>
                <div className = {styles.halfContent}>
                    <div className ={styles.title}>作业人员绑定：</div>
                    <div className = {styles.content}></div>
                </div>
            </div>
          </div>
        </VtxModal>
      </div>
    )
  }
}
export default Index